]> dgit.raspbian.org Git - gnome-shell.git/commit
screencast: Always copy buffers in pipewiresrc
authorSebastian Keller <skeller@gnome.org>
Sun, 21 Aug 2022 14:00:40 +0000 (16:00 +0200)
committerMarge Bot <marge-bot@gnome.org>
Sat, 3 Sep 2022 15:15:31 +0000 (15:15 +0000)
commitd32c03488fcf6cdb0ca2e99b0ed6ade078460deb
treee78f9380135d36a305b3e14617d546de631bc77f
parent91ce5ca960879dbe810cde43265d00b5c6446a1a
screencast: Always copy buffers in pipewiresrc

Pipewire 0.3.52 via commit a1f33a99 introduced a change that affects how
long pipewiresrc holds onto the pw_buffers it dequeued. Before that
change the pw_buffer was held until the end of the videoconvert element
at the beginning of the pipeline. After that change the pw_buffer was
held onto until the filesink at the end of the pipeline. This was
starving MetaScreenCastStreamSrc of pw_buffers to record new frames
into, resulting in the majority of frames being missed, especially in
situations in which the encoder was taking longer.

Pipewire 0.3.57 via commit 1ea1d525 will allow queuing the pw_buffer
early again via the `always-copy` option. This however is only a
workaround until a proper solution is found in either pipewire or
gstreamer that does not depend on copying the buffer contents and
instead queues the pw_buffer again after videoconvert as prior to
a1f33a99.

Since it is not clear yet when a proper solution will arrive, this makes
use of `always-copy` as a workaround for now and should be reverted once
it is no longer needed.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5585
Related: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2461
Related: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/283
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2436>
js/dbusServices/screencast/screencastService.js